﻿<div id="tb">
    <table cellpadding="0" cellspacing="0" style="width: 100%">
        <tr>
            <td>
                <a href="#" class="easyui-linkbutton" iconcls="iconfont iconfont-dianji" plain="true" onclick="select()">选择</a>
            </td>
            <td style="text-align:right">
                <input class="easyui-searchbox" data-options="prompt:'输入表名',searcher:doSearch" style="width:200px">
            </td>
        </tr>
    </table>
</div>
<table id="dg" class="easyui-datagrid" rownumbers="true" fit="true" pagination="true" fitcolumns="true" striped="true" border="false" idfield="EntityFullName"
       url="getEntityList" autorowheight="false" singleselect="true" toolbar="#tb">
    <thead>
        <tr>
            <th field="ModuleName" width="150" halign='center'>
                数据库名
            </th>
            <th field="TableName" width="250" halign='center'>
                表名
            </th>
            <th field="Name" width="200" halign='center'>
                描述
            </th>
        </tr>
    </thead>
</table>
<script>
    
</script>
<script>    

    function select()
    {
        var selected = $('#dg').datagrid('getSelected');
        if (!selected)
        {
            msgBox('请选择一项数据');
            return;
        }

        closeWindow(selected);
    }

    function doSearch(value, name) {
        $('#dg').datagrid('load', {
            TableName: value
        });
    }
</script>

